package day06;

public class Demo1 {
    public static void main(String[] args) {

    }
}
abstract class Animal{

    public Animal(){}

    public abstract void eat();

    public abstract void sleep();


}

class Cat extends Animal{

        public Cat(){}

    @Override
    public void eat() {
        System.out.println("猫吃鱼");
    }

    @Override
    public void sleep() {
        System.out.println("猫睡觉");
    }

    public void play(){
            System.out.println("猫在玩游戏");
        }

    public void hide(){
        System.out.println("猫在玩躲猫猫");
    }
}

class Dog extends Animal{

    public Dog() {
    }

    @Override
    public void eat() {
        System.out.println("狗吃肉");
    }

    @Override
    public void sleep() {
        System.out.println("狗趴着睡觉");
    }

    public void play(){
        System.out.println("狗跟猫玩");
    }

    public void carehome(){
        System.out.println("狗看门");
    }

}
